package com.bailan.foreat.vo;


import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Document(indexName = "esproduct", shards = 3, replicas = 2)
@Data
public class EsProduct implements Serializable {

    @Id
    private Integer id;

    @Field(name = "productName", analyzer = "ik_max_word", searchAnalyzer = "ik_max_word", type = FieldType.Text)
    private String productName;

    @Field(type = FieldType.Double)
    private BigDecimal productPrice;

    @Field(type = FieldType.Keyword)
    private String productImg;

    @Field(type = FieldType.Integer)
    private Integer stockCount;

    @Field(type = FieldType.Integer)
    private Integer buyCount;

    @Field(type = FieldType.Integer)
    private Integer type;

    @Field(type = FieldType.Integer)
    private Integer storeId;
    @Field(type = FieldType.Text)
    private String storeName;

    @Field(type = FieldType.Integer)
    private Integer status;

    @Field(type = FieldType.Keyword)
    private List<String> typeName;


    @Field(type = FieldType.Keyword)
    private List<Integer> typeIds;



}


